import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'

// 引入vant
// import Vue from 'vue';
import Vant from 'vant';
import 'vant/lib/index.css'
Vue.use(Vant)

Vue.config.productionTip = false

// 全局的ajax
import {ajax} from "./API/index"
Vue.prototype.$ajax=ajax

import "@/utils/mixins"

import "@/components/index"

// 淘宝适配
import 'lib-flexible'
new Vue({
  router,
  store,
  watch:{
    '$route':function(to,from){//监听路由切换
      console.log(from)
      this.changeFromRoute(from.name)
    }
  },
  render: h => h(App)
}).$mount('#app')
